package com.shenyi.shop.service;

import com.shenyi.shop.api.ISpecificationService;
import com.shenyi.shop.dao.SpecificationMapper;
import com.shenyi.shop.entity.SpecificationDO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author richard.fan
 * @version 1.0
 * @date 2018/11/05
 * @desc 规格
 * @see
 * @since 1.0
 */
@Service
public class SpecificationServiceImpl implements ISpecificationService {

    @Autowired
    private SpecificationMapper specificationMapper;

    @Override
    public SpecificationDO queryObject(Integer id){
        return specificationMapper.queryObject(id);
    }

    @Override
    public List<SpecificationDO> queryList(Map<String, Object> map){
        return specificationMapper.queryList(map);
    }

    @Override
    public int queryTotal(Map<String, Object> map){
        return specificationMapper.queryTotal(map);
    }

    @Override
    public void save(SpecificationDO specification){
        specificationMapper.save(specification);
    }

    @Override
    public void update(SpecificationDO specification){
        specificationMapper.update(specification);
    }

    @Override
    public void delete(Integer id){
        specificationMapper.delete(id);
    }

    @Override
    public void deleteBatch(Integer[] ids){
        specificationMapper.deleteBatch(ids);
    }
}
